## Table A10: Effects of Neighborhood Race and Income on Expected Wait Times: Date Fixed Effects

## install.packages(c("tidyverse", "fixest"))
## library(tidyverse)

## SET WORKING DIRECTORY HERE
## setwd()

## Loading data
## load("dta.RData")

## Column 1
race_wait_across_date <- feols(log_expected_time ~ factor(white_third) |
                                 city^ open_date, data = dta %>% filter(city != "New York"), cluster = "geo")

## Column 2
race_wait_within_date <- feols(log_expected_time ~ factor(white_third) |
                                 city_service^ open_date, data = dta %>% filter(city != "New York"), cluster = "geo")

## Column 3
inc_wait_across_date <- feols(log_expected_time ~ factor(inc_third) |
                                city^ open_date, data = dta %>% filter(city != "New York"), cluster = "geo")

## Column 4
inc_wait_within_date <- feols(log_expected_time ~ factor(inc_third) |
                                city_service^ open_date, data = dta %>% filter(city != "New York"), cluster = "geo")

TableA10 = etable(race_wait_across_date, race_wait_within_date,
                  inc_wait_across_date, inc_wait_within_date,
                  signifCode = c("+" = 0.10, "*" = 0.05, "**" = 0.01, "***" = 0.001),
                  digits = 3, digits.stats = 3, fitstat = c("n","r2"))
